package com.osp;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import com.osp.model.Employee;
import com.osp.model.Task;

public class ProjectListReport {

	public Set<String> getProjectList(ProjectManager pm) {

		Set<String> projectsList = new HashSet<String>();
		for (Employee employee : pm.getEmployees()) {
			for (Integer year : employee.getTasks().keySet()) {
				for (Task task : employee.getTasks().get(year)) {
					projectsList.add(task.getProjectName());
				}
			}
		}
		return projectsList;
	}
}
